import pymysql
import json
conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='ayaxyz1425gg', db='rubyaura')
conn.query("set character_set_connection=utf8;")
conn.query("set character_set_server=utf8;")
conn.query("set character_set_client=utf8;")
conn.query("set character_set_results=utf8;")
cur = conn.cursor(pymysql.cursors.DictCursor)
cur.execute("SELECT * FROM tbl_members")
#print(cur.description)
conn.query("set character_set_database=utf8;")
print()
print( json.dumps(cur.fetchall()) )
#for row in cur:
#    print(row)
cur.close()
conn.close()